package org.xiaojinlong.playground;

/**
 * @author Jin Long
 *         2015/12/12
 */
public class GCD {
    public static int gcd(int p, int q) {
        if (q == 0) {
            return p;
        } else {
            int r = p % q;
            return gcd(q, r);
        }
    }

    public static void main(String[] args) {

    }
}
